#pragma once

#include "ApproachTrace.h"
#include "AsteroidOrbitParam.h"
#include <boost/thread/thread.hpp>

typedef map<CAsteroidOrbitParam::Ptr, CApproachTrace::Ptr>	MapTraceApproaches;

class CApproachHolder: public IApproachHolder
{
	friend class CApproachTrace;
public:
	CApproachHolder(void);
	virtual ~CApproachHolder(void);

	bool AppendDrawInterface(IDrawInterface	*pDrawInterface);

	bool AppendTraceApproaches(CApproachTrace::Ptr listApprc);
	bool GetApproachesInRange(const CGridParam &ranges, ListPtrApproachs &ListOut);
protected:
	boost::mutex		m_mtxMap;
	MapTraceApproaches	m_mapTraceApproaches;

	IDrawInterface		*m_pDrawInterface;
	tm					m_startTime;
};
